package com.guit.hrms.service.impl;

import com.guit.hrms.mapper.ApiMapper;
import com.guit.hrms.mapper.EmployeeMapper;
import com.guit.hrms.po.api.Api;
import com.guit.hrms.service.ApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApiServiceImpl implements ApiService {

    @Autowired
    private ApiMapper apiMapper;
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public Api verifyApi(String employeeId, String completeApi) {
        Integer roleId = employeeMapper.getRoleIdByEmployeeId(employeeId);

        Api api = apiMapper.verifyApi(roleId, completeApi);
        return api;
    }
}
